import request from '@/utils/request'

// 查询销售计划列表
export function listSalePlan(query) {
  return request({
    url: '/system/salePlan/list',
    method: 'get',
    params: query
  })
}

// 查询销售计划详细
export function getSalePlan(id) {
  return request({
    url: '/system/salePlan/' + id,
    method: 'get'
  })
}

// 新增销售计划
export function addSalePlan(data) {
  return request({
    url: '/system/salePlan',
    method: 'post',
    data: data
  })
}

// 修改销售计划
export function updateSalePlan(data) {
  return request({
    url: '/system/salePlan',
    method: 'put',
    data: data
  })
}

// 删除销售计划
export function delSalePlan(id) {
  return request({
    url: '/system/salePlan/' + id,
    method: 'delete'
  })
}

export function getPlanNameOptions(params) {
  return request({
    url: '/system/salePlan/getPlanNameOptions',
    method: 'post',
    data: params
  })
}
